﻿using System;
using System.Collections;
using System.Collections.Generic;

namespace MikeKappel.Com.CS
{
    public static partial class Helper
    {
        /// <summary>
        /// Convert Generic List to an ArrayList
        /// </summary>
        /// <param name="list"></param>
        /// <returns></returns>
        public static ArrayList ToArrayList(IList list)
        {
            List<Object> GenericList = ToListOf<Object>(list);
            return (list == null) ? null : new ArrayList(GenericList.ToArray());
        }
    }
}